{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import pandas as pd\n",
    "import matplotlib.pyplot as plt\n",
    "\n",
    "%matplotlib inline"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "INPUT_PATH = '../input/'\n",
    "CACHE_PATH = '../cache/'\n",
    "OUTPUT_PATH ='../output/'"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "# df_lstm = pd.read_csv(OUTPUT_PATH + 'lstm.csv',header=None,names=['Id','Score'])\n",
    "df_attention = pd.read_csv(OUTPUT_PATH + 'attention_0.53452.csv',header=None,names=['Id','Score'])\n",
    "df_gru = pd.read_csv(OUTPUT_PATH + 'gru.csv',header=None,names=['Id','Score'])\n",
    "df_lstm = pd.read_csv(OUTPUT_PATH + 'lstm_4.7.csv',header=None,names=['Id','Score'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "sub = (df_attention[\"Score\"]+df_gru[\"Score\"]+df_lstm[\"Score\"])/3"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "# sub[sub>4.7] = 5"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "result = pd.DataFrame()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "result[\"Id\"] = df_attention[\"Id\"].copy()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "result[\"Score\"] = pd.DataFrame(sub)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "result.to_csv(OUTPUT_PATH + 'sub_0321.csv',header=False,index=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x7fc4b3a1eb38>"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXsAAAD6CAYAAABApefCAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4wLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvpW3flQAAD8dJREFUeJzt3W9s3dddx/H3d26LQjyyVq0MHahp\npAg0lmZNTJeMrFxXbZRSNqD8K5Siik4RrOxJK0GmZpqG1i2atoI61oG3rEXjj5UJbepIS8NQTAMk\n2uqVNjwAFUGKFlGNsS6Z+4hVXx7cm8RNbd9jx/f+fs55v6RI1+ceX3985HzuyfG9v0RmIkm6uL2h\n6QCSpMGz7CWpApa9JFXAspekClj2klQBy16SKmDZS1IFLHtJqoBlL0kVuKTpAGdceeWVuX79+qK5\nr7zyCmvXrh1soGVqa7a25gKzLUdbc0F7s7U1F1xYtpmZmW9l5lV9J2ZmK/5s3bo1Sx0+fLh47rC1\nNVtbc2WabTnamiuzvdnamivzwrIBz2RBx3qMI0kVsOwlqQKWvSRVwLKXpApY9pJUActekipg2UtS\nBSx7SaqAZS9JFWjN5RIkqSbr9xw8e/uxXYO/jIM7e0mqgGUvSRWw7CWpApa9JFXAspekClj2klQB\ny16SKmDZS1IFLHtJqoBlL0kVWLTsI+LyiHgiIp6JiD/pje2PiKMRsXfOvKIxSVIz+u3s7wL+PDPH\ngTdGxO8CI5m5HdgQERsj4v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55pgx9zQoLtak12wM8kpnfWWRO\nEz9nJU8wA12zVpd9oUUvydCgpyLihyLi+4GdwL8M44sWFGoj69UriC8A78/MFxeY9vmI2BwRI8DP\nAc8NI1tBoTa1Zr8XEb/R+/BNwHwF1sSalRRqU38vbwbujYhp4G0R8dl55jSxZiVPMANds7YU44Vo\n/JIMEXFTRPzOecMfAg7TfUPZH2dm6UXeLiRHSaE2tV730D0Pf6D3C6oPRsT5/7/B7wOfB/4ZOJqZ\nXxl0qMJCbWrNJoG7IuJpYAT4RhvWjLJCbWTNMvPGM+fidNfkoZasWckTzEDXbFW8qSoipjOz0zsn\nfEtm/tGc+64BngC+ArwD2NY7OqlORPw28BHO/SAdBi7NzL1z5vwAcAT4O3qXsFjBdzavOr0XARwA\nvo/uv74+Bfyqa1amV/jvBX7NNVtYRLwV+AsggMeBTwAfy8z3zJnzBrpr9gzdF1fsysz/XLEMq6Hs\n+4nutXd2AE/V/ANVqldwtwBPZ+ZCv2DTHK7Z0rlmSxcRa4DbgK9n5n+s6GNfDGUvSVrcxXBmL0nq\nw7KXpApY9pJUActekipg2UtSBf4f0UOqjguE8sAAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7fc4b3a1e240>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "result['Score'].hist(bins=100)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "df_lstm2 = df_lstm.copy()\n",
    "df_lstm2.loc[df_lstm2['Score'] > 4.8,'Score'] = 5\n",
    "df_lstm2.to_csv(OUTPUT_PATH + 'lstm2.csv',header=False,index=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "df_attention2 = df_attention.copy()\n",
    "df_attention2.loc[df_attention2['Score'] > 4.8,'Score'] = 5\n",
    "df_attention2.to_csv(OUTPUT_PATH + 'attention2.csv',header=False,index=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "df_gru2 = df_gru.copy()\n",
    "df_gru2.loc[df_gru2['Score'] > 4.8,'Score'] = 5\n",
    "df_gru2.to_csv(OUTPUT_PATH + 'gru2.csv',header=False,index=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "def round_score(score):\n",
    "    if 4.7 < score < 5:\n",
    "        return 5\n",
    "    if 3.8 < score < 4:\n",
    "        return 4\n",
    "    return score"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "df_blend = df_lstm.copy()\n",
    "df_blend['Score'] = (0.5 * df_lstm['Score'] + 0.5 * df_attention['Score'])\n",
    "df_blend.loc[df_blend['Score']>4.7,'Score'] = 5\n",
    "#df_blend.loc[(df_blend['Score']>3.8) & (df_blend['Score']<4),'Score'] = 4\n",
    "df_blend.to_csv(OUTPUT_PATH + 'blend.csv',header=False,index=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "df_blend['Score'] = df_blend"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "df_blend['Score'] = df_blend['Score'].map(round_score)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x7f37ebc81d30>"
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYcAAAD8CAYAAACcjGjIAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvNQv5yAAAFZBJREFUeJzt3X+MZWd93/H3J14MxPxYg8nU2nW7lljRAs4PMzJOkaIBp/baIK+l4HZRi9fU0aqRIaS1FNapWquAJVCjEGgD0QZbXlPK4hiot9jgbA2jFCk2/gHFGEM9MhQvdnHI2gsLCdHQb/+4z2yu59zZmb13d+bO9fsljeac5zzPvc/XZ30/9/y4d1JVSJLU7+fWegKSpPFjOEiSOgwHSVKH4SBJ6jAcJEkdhoMkqcNwkCR1GA6SpA7DQZLUsWGtJzCsM844o7Zs2TLU2B//+MecdtppJ3ZCa2RSapmUOsBaxtWk1DJqHffff/8Pquply/Vbt+GwZcsW7rvvvqHGzs7OMjMzc2IntEYmpZZJqQOsZVxNSi2j1pHk/6ykn6eVJEkdhoMkqcNwkCR1GA6SpA7DQZLUYThIkjoMB0lSh+EgSeowHCRJHev2E9KS9GyxZfftR5dv2rY6XwHikYMkqcNwkCR1GA6SpI5lwyHJjUmeTPL1vrb/mOSbSb6W5DNJNvZtuzbJXJJvJbmor31ba5tLsruv/ewk9yR5JMknk5x6IguUJB2/lRw53ARsW9R2AHh1Vf0i8L+BawGSvBLYAbyqjflwklOSnAL8EXAx8ErgLa0vwPuBD1TVVuAp4KqRKpIkjWzZcKiqPwcOLWr7s6qab6t3A5vb8nZgX1X9tKq+DcwB57Wfuap6tKr+FtgHbE8S4A3ArW38XuCyEWuSJI3oRFxz+JfA59ryJuCxvm0HW9tS7S8Fnu4LmoV2SdIaGulzDkn+LTAPfHyhaUC3YnAI1TH6L/V8u4BdAFNTU8zOzh7PdI86cuTI0GPHzaTUMil1g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SkqSOiT2tJEkanuEgSeowHCRJHYaDJKnDcJAkdRgOkqQOw0GS1GE4SJI6/j/hNtnzcxaPNQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7f37ebcf1438>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "df_blend['Score'].hist(bins=100)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "df_blend.to_csv(OUTPUT_PATH + 'blend.csv',header=False,index=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
